package com.intretech.umsin.code.generator.provider;


import com.intretech.umsin.code.generator.component.CamelCaseUtils;
import freemarker.template.TemplateMethodModel;
import freemarker.template.TemplateModelException;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class TemplateMethodForUnderlineToCamel implements TemplateMethodModel {

	@Override
	public Object exec(List arg0) throws TemplateModelException {
		
		return CamelCaseUtils.underlineToCamel(arg0.get(0).toString(),Boolean.valueOf(arg0.get(1).toString()));
	}

}
